package com.yzion.demo_coollist.net

import com.yzion.baselib.http.ApiHelper
import com.yzion.baselib.http.ApiHelper.Companion.get
import retrofit2.Callback

/**
 * 影片相关接口
 */
object MovieApi {
    const val API_BASE_URL = "http://192.168.50.186:8088/api/"
    private val service by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
        ApiHelper.get().create(
            API_BASE_URL,
            MovieApiService::class.java, MovieApiConfig()
        )
    }

    fun getMovie(id: String?, callback: Callback<String?>?) {
        service.getMovie(id)!!.enqueue(callback)
    }
}